use sqlx::{postgres::PgPoolOptions, PgPool};

/// 创建一个 PgPool 实例
pub async fn get_pool(database_url: &str) -> PgPool {
    let pool = PgPoolOptions::new()
    .max_connections(5)
    .connect(&database_url).await
    .expect("DATABASE connect failed");
    
    pool
}
